<?php

if (validation_errors()) :
?>
<section class="content-header">
<div class='alert alert-block alert-error fade in'>
    <a class='close' data-dismiss='alert'>&times;</a>
    <h4 class='alert-heading'>
        <?php echo lang('black_errors_message'); ?>
    </h4>
    <?php echo validation_errors(); ?>
</div>
</section>
<?php
endif;

$id = isset($black->id) ? $black->id : '';

?>

<!-- <section class="content-header">
      <h1>
        General Form Elements
        <small>Preview</small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">Forms</a></li>
        <li class="active">General Elements</li>
      </ol>
    </section> -->

<!-- Main content -->
<section class="content">
  <div class="row">
    <div class="col-xs-12">
        <div class="box box-primary">
            <div class="box-header with-border">
              <h3 class="box-title">新增<?php echo lang('black_area_title'); ?></h3>
            </div>
            <!-- /.box-header -->
            <!-- form start -->
            <?php echo form_open($this->uri->uri_string(), 'class="form-horizontal"'); ?>
              <div class="box-body">
                <div class="form-group">
                  <?php echo form_label("电话", 'phone', array('class'=>'col-sm-2 control-label')); ?>
                  <div class="col-sm-10">
                  <input id='phone' type='text' required='required' name='phone' class="form-control" maxlength='100' value="<?php echo set_value('phone', isset($black->phone) ? $black->phone : ''); ?>"/>
                  </div>
                </div>
                <div class="form-group">
                  <?php echo form_label("来源", 'blacklistGroupId', array('class'=>'col-sm-2 control-label')); ?>
                  <div class="col-sm-10">
                  <input id='blacklistGroupId' type='text' required='required' name='blacklistGroupId' class="form-control" maxlength='100' value="<?php echo set_value('blacklistGroupId', isset($black->blacklistGroupId) ? $black->blacklistGroupId : ''); ?>"/>
                  </div>
                </div>
                <div class="form-group">
                  <?php echo form_label("备注", 'remarks', array('class'=>'col-sm-2 control-label')); ?>
                  <div class="col-sm-10">
                  <input id='remarks' type='text' required='required' name='remarks' class="form-control" maxlength='100' value="<?php echo set_value('remarks', isset($black->remarks) ? $black->remarks : ''); ?>"/>
                  </div>
                </div>
              </div>
              <!-- /.box-body -->

              <div class="box-footer">
                <button type="submit" name='save' class="btn btn-primary">Submit</button>
                <?php echo anchor('admin/black/index', "返回", 'class="btn btn-default pull-right"'); ?>
              </div>
            <?php echo form_close(); ?>
          </div>

          </div>
      </div>
</section>
